using CampusModel.Model;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace CampusModel.Configuration;

public class StudentConfiguration :IEntityTypeConfiguration<Student>
{
    public void Configure(EntityTypeBuilder<Student> builder)
    {
        builder.HasKey(t => t.Id);
        builder.HasMany(x => x.AttendanceRecords).WithMany(x => x.Students).UsingEntity("AttendanceRecordStudent");
    }
}